package cn.kgm.decorator;

import cn.kgm.decorator.shape.Circle;
import cn.kgm.decorator.shape.Rectangle;

/**
 * 装饰器模式
 */
public class DecoratorPatternDemo {
    public static void main(String[] args) {
        RedShapeDecorator red = new RedShapeDecorator(new Circle());
        red.draw();
        RedShapeDecorator red2 = new RedShapeDecorator(new Rectangle());
        red2.draw();
    }
}
